<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <title>include</title>
    <meta charset="UTF-8">
    <script type="text/javascript" src="../../static/template.js"></script>
</head>
<body>
<div id="app"></div>
<script type="text/html" id="topicPart">
    <h1>题目：{{topic}}</h1>
    <ul>
        {{each optionList as value index}}
        <li>{{value.ind}} . {{value.val}}</li>
        {{/each}}
    </ul>
    {{include 'anserPart'}}
</script>
<script type="text/html" id = "anserPart">
    <span>参考答案：{{anser}}</span>
</script>
<script type="text/javascript">
   var  data = {
       topic:'1+1=?',
       optionList:[
           {ind:'A',val:2},
           {ind:'B',val:1},
           {ind:'C',val:3},
           {ind:'D',val:4},
       ],
       anser:"A"
   }
   var html = template("topicPart",data);
   document.getElementById("app").innerHTML = html;
</script>
</body>
</html>